<html>
<head>
<title>ATL 8.0 test page for object CardSystem</title>

<script type="text/javascript">

function onCardInsert(arg1, arg2) {
    // do something 
}

window.onload = function () {

    var cardSystem;
    if (document.getElementById) {
        cardSystem = document.getElementById('CardSystem');
    }
    else {
        cardSystem = document.all['CardSystem'];
    }

    if (typeof (cardSystem) === 'undefined' || cardSystem === null) {
        alert('Unable to load ActiveX');
        return;
    }

    window.alert(cardSystem.Readers.Count);

    // attach events 
    var status = cardSystem.attachEvent('CardInsert', onCardInsert);
} 

</script>

</head>

<body>

<object id="CardSystem" classid="CLSID:78A642F7-0EF9-4606-99F5-9996625E3D2B"></object>

</body>
</html>
